<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.5"/>
<title>xxvethernet: xxxvethernet_example_intr_mcdma.c File Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
  $(document).ready(initResizable);
  $(window).load(resizeHeight);
</script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
<link href="HTML_custom.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectlogo"><img alt="Logo" src="xlogo_bg.png"/></td>
  <td style="padding-left: 0.5em;">
   <div id="projectname">xxvethernet
   </div>
   <div id="projectbrief">Vitis Drivers API Documentation</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.5 -->
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Overview</span></a></li>
      <li><a href="annotated.html"><span>Data&#160;Structures</span></a></li>
      <li><a href="globals.html"><span>APIs</span></a></li>
      <li><a href="files.html"><span>File&#160;List</span></a></li>
    </ul>
  </div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
$(document).ready(function(){initNavTree('xxxvethernet__example__intr__mcdma_8c.html','');});
</script>
<div id="doc-content">
<div class="header">
  <div class="summary">
<a href="#func-members">Functions</a>  </div>
  <div class="headertitle">
<div class="title">xxxvethernet_example_intr_mcdma.c File Reference</div>  </div>
</div><!--header-->
<div class="contents">
<a name="details" id="details"></a><h2 class="groupheader">Overview</h2>
<div class="textblock"><p>Implements examples that utilize the Xxv Ethernet's interrupt driven MCDMA packet transfer mode to send and receive frames. </p>
<p>This example demonstrates how to perform a simple send and receive.</p>
<p>Functional guide to example:</p>
<ul>
<li>XxvEthernetSgDmaIntrSingleFrameExample demonstrates the simplest way to send and receive frames in interrupt driven mode.</li>
</ul>
<pre>
MODIFICATION HISTORY:</pre><pre>Ver   Who  Date     Changes
</p>
<hr/>
<p>
1.0   hk   06/16/17 First release
1.4   rsp  05/12/20 Fix Wint-conversion gcc warning in <a class="el" href="xxxvethernet__example__intr__mcdma_8c.html#a2ab44798c93b77a1cf837f04bc809db7" title="This function demonstrates the usage usage of the Xxv Ethernet by sending and receiving frames in int...">XxvEthernetSgDmaIntrExample()</a>.</pre><pre></pre> </div><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
Functions</h2></td></tr>
<tr class="memitem:a2ab44798c93b77a1cf837f04bc809db7"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="xxxvethernet__example__intr__mcdma_8c.html#a2ab44798c93b77a1cf837f04bc809db7">XxvEthernetSgDmaIntrExample</a> (INTC *IntcInstancePtr, <a class="el" href="struct_x_xxv_ethernet.html">XXxvEthernet</a> *XxvEthernetInstancePtr, XMcdma *DmaInstancePtr, u16 XxvEthernetDeviceId, u16 AxiMcDmaDeviceId)</td></tr>
<tr class="memdesc:a2ab44798c93b77a1cf837f04bc809db7"><td class="mdescLeft">&#160;</td><td class="mdescRight">This function demonstrates the usage usage of the Xxv Ethernet by sending and receiving frames in interrupt driven MCDMA mode.  <a href="#a2ab44798c93b77a1cf837f04bc809db7">More...</a><br/></td></tr>
<tr class="separator:a2ab44798c93b77a1cf837f04bc809db7"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a8b7170116154c4ce8b89da78bdf9070d"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="xxxvethernet__example__intr__mcdma_8c.html#a8b7170116154c4ce8b89da78bdf9070d">XxvEthernetSgDmaIntrSingleFrameExample</a> (<a class="el" href="struct_x_xxv_ethernet.html">XXxvEthernet</a> *XxvEthernetInstancePtr, XMcdma *DmaInstancePtr, u8 ChanId)</td></tr>
<tr class="memdesc:a8b7170116154c4ce8b89da78bdf9070d"><td class="mdescLeft">&#160;</td><td class="mdescRight">This function demonstrates the usage of the Xxv Ethernet by sending and receiving a single frame in interrupt mode using MCDMA.  <a href="#a8b7170116154c4ce8b89da78bdf9070d">More...</a><br/></td></tr>
<tr class="separator:a8b7170116154c4ce8b89da78bdf9070d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a840291bc02cba5474a4cb46a9b9566fe"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="xxxvethernet__example__intr__mcdma_8c.html#a840291bc02cba5474a4cb46a9b9566fe">main</a> (void)</td></tr>
<tr class="memdesc:a840291bc02cba5474a4cb46a9b9566fe"><td class="mdescLeft">&#160;</td><td class="mdescRight">This is the main function for the Xxv Ethernet example.  <a href="#a840291bc02cba5474a4cb46a9b9566fe">More...</a><br/></td></tr>
<tr class="separator:a840291bc02cba5474a4cb46a9b9566fe"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<h2 class="groupheader">Function Documentation</h2>
<a class="anchor" id="a840291bc02cba5474a4cb46a9b9566fe"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int main </td>
          <td>(</td>
          <td class="paramtype">void&#160;</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>This is the main function for the Xxv Ethernet example. </p>
<p>This function is not included if the example is generated from the TestAppGen test tool.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">None.</td><td></td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>- XST_SUCCESS to indicate success.<ul>
<li>XST_FAILURE to indicate failure</li>
</ul>
</dd></dl>
<dl class="section note"><dt>Note</dt><dd>None. </dd></dl>

<p>References <a class="el" href="xxxvethernet__example__intr__mcdma_8c.html#a2ab44798c93b77a1cf837f04bc809db7">XxvEthernetSgDmaIntrExample()</a>, and <a class="el" href="xxxvethernet__example_8h.html#ae5577a2e1499d8be6c88fcac63e8d553">XxvEthernetUtilErrorTrap()</a>.</p>

</div>
</div>
<a class="anchor" id="a2ab44798c93b77a1cf837f04bc809db7"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int XxvEthernetSgDmaIntrExample </td>
          <td>(</td>
          <td class="paramtype">INTC *&#160;</td>
          <td class="paramname"><em>IntcInstancePtr</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="struct_x_xxv_ethernet.html">XXxvEthernet</a> *&#160;</td>
          <td class="paramname"><em>XxvEthernetInstancePtr</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">XMcdma *&#160;</td>
          <td class="paramname"><em>DmaInstancePtr</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">u16&#160;</td>
          <td class="paramname"><em>XxvEthernetDeviceId</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">u16&#160;</td>
          <td class="paramname"><em>AxiMcDmaDeviceId</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>This function demonstrates the usage usage of the Xxv Ethernet by sending and receiving frames in interrupt driven MCDMA mode. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">IntcInstancePtr</td><td>is a pointer to the instance of the Intc component. </td></tr>
    <tr><td class="paramname">XxvEthernetInstancePtr</td><td>is a pointer to the instance of the XxvEthernet component. </td></tr>
    <tr><td class="paramname">DmaInstancePtr</td><td>is a pointer to the instance of the AXI MCDMA component. </td></tr>
    <tr><td class="paramname">XxvEthernetDeviceId</td><td>is Device ID of the Xxv Ethernet Device , typically XPAR_&lt;XXVETHERNET_instance&gt;_DEVICE_ID value from xparameters.h. </td></tr>
    <tr><td class="paramname">AxiMcDmaDeviceId</td><td>is Device ID of the Axi MCDMA Device , typically XPAR_&lt;AXIMCDMA_instance&gt;_DEVICE_ID value from xparameters.h. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>-XST_SUCCESS to indicate success -XST_FAILURE to indicate failure</dd></dl>
<dl class="section note"><dt>Note</dt><dd>AxiMcdma hardware must be initialized before initializing XxvEthernet. Since AxiMcdma reset line is connected to the XxvEthernet reset line, a reset of AxiMcdma hardware during its initialization would reset XxvEthernet. </dd></dl>

<p>References <a class="el" href="struct_x_xxv_ethernet___config.html#a7224e895cfa19a244b6394008f72b892">XXxvEthernet_Config::BaseAddress</a>, <a class="el" href="struct_x_xxv_ethernet___config.html#a49f53742b9dcc82373e52a28de62d130">XXxvEthernet_Config::XxvDevBaseAddress</a>, <a class="el" href="xxxvethernet__example__intr__mcdma_8c.html#a8b7170116154c4ce8b89da78bdf9070d">XxvEthernetSgDmaIntrSingleFrameExample()</a>, <a class="el" href="xxxvethernet__example_8h.html#abb5bc0fd706a832742ca65487e6687af">XxvEthernetUtilEnterLocalLoopback()</a>, <a class="el" href="xxxvethernet__example_8h.html#ae5577a2e1499d8be6c88fcac63e8d553">XxvEthernetUtilErrorTrap()</a>, <a class="el" href="group__xxvethernet.html#gad071a1cb807ee930634dac763c9d8227">XXxvEthernet_CfgInitialize()</a>, <a class="el" href="group__xxvethernet.html#ga86ba8ac72612ee0ab2318dbb7146ee3a">XXxvEthernet_LookupConfig()</a>, and <a class="el" href="group__xxvethernet.html#gacd8a86e3ca2431a4181de0d75fd58759">XXxvEthernet_Stop()</a>.</p>

<p>Referenced by <a class="el" href="xxxvethernet__example__intr__mcdma_8c.html#a840291bc02cba5474a4cb46a9b9566fe">main()</a>.</p>

</div>
</div>
<a class="anchor" id="a8b7170116154c4ce8b89da78bdf9070d"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int XxvEthernetSgDmaIntrSingleFrameExample </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="struct_x_xxv_ethernet.html">XXxvEthernet</a> *&#160;</td>
          <td class="paramname"><em>XxvEthernetInstancePtr</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">XMcdma *&#160;</td>
          <td class="paramname"><em>DmaInstancePtr</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">u8&#160;</td>
          <td class="paramname"><em>ChanId</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>This function demonstrates the usage of the Xxv Ethernet by sending and receiving a single frame in interrupt mode using MCDMA. </p>
<p>The source packet will be described by two descriptors. It will be received into a buffer described by a single descriptor.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">XxvEthernetInstancePtr</td><td>is a pointer to the instance of the Xxv Ethernet component. </td></tr>
    <tr><td class="paramname">DmaInstancePtr</td><td>is a pointer to the instance of the Dma component.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>-XST_SUCCESS to indicate success -XST_FAILURE to indicate failure</dd></dl>
<dl class="section note"><dt>Note</dt><dd>None. </dd></dl>

<p>References <a class="el" href="xxxvethernet__example_8h.html#ae5577a2e1499d8be6c88fcac63e8d553">XxvEthernetUtilErrorTrap()</a>, <a class="el" href="xxxvethernet__example_8h.html#a445292fcf7f28cbf3a9c379eb311b371">XxvEthernetUtilFrameHdrFormatMAC()</a>, <a class="el" href="xxxvethernet__example_8h.html#a10525c2457e7790f874b9bef3635b322">XxvEthernetUtilFrameHdrFormatType()</a>, <a class="el" href="xxxvethernet__example_8h.html#ad9494c30f93da4a8476ec61c8b1605b5">XxvEthernetUtilFrameMemClear()</a>, <a class="el" href="xxxvethernet__example_8h.html#a3435bac2a9a1be6bd28fda22f93c5f7c">XxvEthernetUtilFrameSetPayloadData()</a>, <a class="el" href="xxxvethernet__example_8h.html#a9442be912857bc50928bb7a53d5b6685">XxvEthernetUtilFrameVerify()</a>, <a class="el" href="group__xxvethernet.html#ga6e4b05d1a7db9def0f688bb3f12839f1">XXxvEthernet_Start()</a>, and <a class="el" href="group__xxvethernet.html#gacd8a86e3ca2431a4181de0d75fd58759">XXxvEthernet_Stop()</a>.</p>

<p>Referenced by <a class="el" href="xxxvethernet__example__intr__mcdma_8c.html#a2ab44798c93b77a1cf837f04bc809db7">XxvEthernetSgDmaIntrExample()</a>.</p>

</div>
</div>
</div><!-- contents -->
</div><!-- doc-content -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
	<p class="footer">&copy; Copyright 2015-2022 Xilinx, Inc. All Rights Reserved.</p>
	<p class="footer">&copy; Copyright 2022-2023 Advanced Micro Devices, Inc. All Rights Reserved.</p>
</div>
</body>
</html>
